package com.qf.czh.vhr.entity;

public class RespBean {
    private Integer status;
    private String msg;
    private Object object;

    public RespBean() {
    }

    public RespBean(Integer status, String msg, Object object) {
        this.status = status;
        this.msg = msg;
        this.object = object;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getObject() {
        return object;
    }

    public void setObject(Object object) {
        this.object = object;
    }

    @Override
    public String toString() {
        return "RespBean{" +
                "status=" + status +
                ", msg='" + msg + '\'' +
                ", object=" + object +
                '}';
    }

    public static RespBean ok(String msg ){
       RespBean respBean =  new RespBean();
       respBean.setStatus(200);
       respBean.setMsg(msg);
        return respBean;
    }

    public static RespBean ok(String msg ,Object o ){
        RespBean respBean =  new RespBean();
        respBean.setStatus(200);
        respBean.setMsg(msg);
        respBean.setObject(o);
        return respBean;
    }

    public static RespBean error(String msg){
        RespBean respBean =  new RespBean();
        respBean.setStatus(500);
        respBean.setMsg(msg);
        return respBean;
    }

    public static RespBean error(String msg , Object o){
        RespBean respBean =  new RespBean();
        respBean.setStatus(500);
        respBean.setMsg(msg);
        respBean.setObject(o);
        return respBean;
    }
}
